<template>
  <div>
    这是一个子组件num:{{ num }}
  </div>

</template>

<script>
export default {
  props: {
    num: {
      type: Number,
      required: true
    }
  },
  methods: {
    getNum() {
      console.log(this.num, '子组件的num')
    }
  }
}
</script>

<style>

</style>
